home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************/
- /*
- /* serial.h
- /* by Atul Butte
- /* Copyright © 1989 by Microsoft Corporation
- /* All Rights Reserved
- /*
- /* version 1.0
- /*
- /*
- /* Specifies constants in serial commands.
- /*
- /***********************************************************************/
-
- /***********************************************************************/
- /*
- /* If you are using Think C to compile, remove the following line.
- /* Each serial command file should be placed in its own project along with
- /* error.c and MacTraps. The project type should be set to Code Resource
- /* with the resource type set to CODE. Each project should have a different
- /* resource number and the name should be set to the routine name
- /* (e.g. serial.writeFile). You will have to use ResEdit to copy all the
- /* individual CODE resources and place them into the serial library
- /* macro sheet.
- /*
- /***********************************************************************/
-
- #define MPW
-
-
- #ifndef MPW
- #define THINK
- #endif
-
- #ifdef MPW
- #include <Types.h>
- #include <Quickdraw.h>
- #include <Fonts.h>
- #include <Serial.h>
- #include <Files.h>
- #include <ToolUtils.h>
- #include <OSUtils.h>
- #include <Events.h>
- #include <Memory.h>
- #include <Errors.h>
-
- #define RememberA0( )
- #define SetUpA4( )
- #define RestoreA4( )
- #endif
-
- #ifdef THINK
- #include <SerialDvr.h>
- #include <SetUpA4.h>
-
- #define RamSDOpen( port ) RAMSDOpen( port )
- #define RamSDClose( port ) RAMSDClose( port )
-
- #endif
-
- #include "get_port.h"
-
- #define display_error( pstMsg ) \
- display_string( "\p" ROUTINE_NAME ": " pstMsg )
-
- #define krefBPortOut -9
- #define krefBPortIn -8
-
- #define krefAPortOut -7
- #define krefAPortIn -6
-
- #define kchBell (7)
- #define kchBackspace (8)
- #define kchLinefeed (10)
- #define kchReturn (13)
- #define kchDelete (127)
-
- #define errParam -1
- #define errConfigStr -2
- #define errInvalidPort -3
- #define errStrFormat -4
- #define errMemory -5
- #define errTimeOut -6
-
- #define errSerialWrite -7
- #define errSerialRead -8
- #define errSerialClrBrk -9
- #define errSerialSetBrk -10
- #define errSerialGetBuf -11
- #define errSerialOpen -12
- #define errSerialClose -13
- #define errSerialReset -14
- #define errSerialSetBuf -15
- #define errDiskWrite -16
- #define errDiskRead -17
-
- enum { fFalse, fTrue };
-